package com.example.fashion.android.home;

import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.fashion.android.R;
import com.example.fashion.android.base.BaseActivity.BaseActivity;
import com.example.fashion.android.util.DialogUtil;

public class MainActivity extends BaseActivity {

    Button mLogin;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public void initView() {
        //隐藏标题栏
        hideSystemTitleBar();

        mLogin = (Button) findViewById(R.id.btn_login);
    }

    @Override
    public void initData() {
        mLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                DialogUtil.getDialog(MainActivity.this, "未成年人禁止入内", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        MainActivity.this.startActivity(new Intent(getApplicationContext(),HomeActivity.class));
                        finish();
                    }
                });
            }
        });
    }

    @Override
    protected void clear() {

    }


}
